
<div id="actionbar">
    <a href="{:url('vip/add')}" class="button button-blue"> <i class="iconfont icon-add_icon"></i>增加会员组</a>
</div>
<div class="tipbox tipbox-message mb5">
    <span class="fn-fb">友情提示:<br /></span>
    1、只有《禁止升级》的会员会员才可以享受其它会员的推荐收益。<br />
    2、只允许有一个《禁止升级》的会员会员类型。<br />
    3、<span class="blue fn-fb">客户端会员显示顺序按照您设置的排序<span class="red">(从大到小)</span>依次展示（请谨慎设置,顺序不对会出现大小级别升级顺序错乱）。</span>
</div>
<table class="table table-border">
    <thead>
        <tr>
            <th class="w40 fn-tac"><input type="checkbox" onclick="CheckAll(this)"></th>         
            <th class="w180">操作</th>
            <th class="w80 fn-tac">排序</th>
            <th class="w80 fn-tac">允许升级</th>
            <th class="w80 fn-tac">消费奖励</th>
            <th>会员名称</th>
            <th class="w80 fn-tar">推荐</th>
            <th class="w80 fn-tar">好店</th>
            <th class="w80 fn-tar">分员工</th>
            <th class="w80 fn-tar">分公司</th>
            <th class="w80 fn-tar">采基金</th>
            <th class="w80 fn-tar">平台</th>
            <th class="w80 fn-tar">优惠券数量</th>
            <th class="w140 fn-tac">更新时间</th>
            <th class="w100 fn-tac">删除</th>
        </tr>
    </thead>
    <tbody>
        {foreach $lists as $vo}
        <tr>
            <td class="fn-tac"><input name="sub" type="checkbox" value="{$vo.id}"></td>
            <td class="button-group">
                <a class="button" href="{:url('vip/edit',array('id'=>$vo.id))}" title="编辑"><i class="iconfont icon-edit"></i>编辑</a>
                <a class="button" href="{:url('vip/coupon',array('id'=>$vo.id))}" title="优惠券"><i class="iconfont icon-discount"></i>优惠券</a>
            </td>
            <td class="fn-tac"><input name="sort" class="fn-tac w40 input input-mini" type="text" value="{$vo['sort']}" id="{$vo.id}" /></td>
            <td class="fn-tac">
                <a class="istop" url="{:url('vip/istop',array('id'=>$vo.id))}" href="javascript:;" title="允许/禁止">
                {if $vo.is_up}
                    <span class="badge bg-green">允许</span>
                {else}
                    <span class="badge">禁止</span>
                {/if}
                </a>
            </td>
            <td class="fn-tac">{if $vo.is_tax}<span class="badge bg-green">{$vo.nominate}%</span>{else}<span class="badge">禁止</span>{/if}</td>
            <td><a href="{:url('allwin/vip_user/index',array('vip_id'=>$vo.id))}"><i class="iconfont icon-my_icon"></i>{$vo.name}</a></td>
            <td class="fn-tar">{$vo.store_workers}</td>
            <td class="fn-tar">{$vo.store}</td>
            <td class="fn-tar">￥{$vo.company_workers}</td>
            <td class="fn-tar">￥{$vo.company}</td>
            <td class="fn-tar">￥{$vo.stock}</td>
            <td class="fn-tar">￥{$vo.group}</td>
            <td class="fn-tar">{$vo.coupon_num}</td>
            <td class="fn-tac">{$vo.update_time|date='Y-m-d H:i'}</td>
            <td class="fn-tac">
                <a class="button isDel" url="{:url('vip/delete',array('id'=>$vo.id))}" href="javascript:;" title="删除"><i class="iconfont icon-lajixiang"></i>删除</a>
             </td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$lists|raw}
<script type="text/javascript">
    Do('base', 'layer', function () {
        $('.isDel').isDel();
        sort("{:url('vip/sort')}");
        $('.istop').click(function () {
            var url = $(this).attr("url");
            parent.layer.confirm('确认要设置升级状态?',{ icon: 3,title: '友情提示' }, function (index) {
                $.getJSON(url, function (data) {window.location.reload();});
                parent.layer.close(index);
            });
        })
    })
</script>